blob: 22e0c12451baee1800d90039b38e71c6bcf8c579 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
import { Suspense } from "react"
import { Shell } from "@/components/shell"
import { DataTableSkeleton } from "@/components/data-table/data-table-skeleton"
import { InformationButton } from "@/components/information/information-button"
import { PcrTable } from "@/lib/pcr/table/pcr-table";
import { getPcrPoList } from "@/lib/pcr/service";
import { useTranslation } from "@/i18n"
export const metadata = {
title: "PCR 관리",
description: "Purchase Change Request를 생성하고 관리할 수 있습니다.",
};
interface IndexPageProps {
params: Promise<{ lng: string }>
}
async function PcrTableWrapper() {
// 기본 데이터 조회 (EvcP용 - 모든 데이터 조회)
const tableData = await getPcrPoList({
page: 1,
perPage: 10,
});
return <PcrTable tableData={tableData} isEvcpPage={true} currentVendorId={undefined} />;
}
export default async function PcrPage({ params }: IndexPageProps) {
const { lng } = await params
const { t } = await useTranslation(lng, 'menu')
return (
<Shell className="gap-4">
{/* ═══════════════════════════════════════════════════════════════ */}
{/* 페이지 헤더 */}
{/* ═══════════════════════════════════════════════════════════════ */}
<div className="flex items-center justify-between space-y-2">
<div className="flex items-center justify-between space-y-2">
<div>
<div className="flex items-center gap-2">
<h2 className="text-2xl font-bold tracking-tight">
{t('menu.procurement.pcr')}
</h2>
<InformationButton pagePath="evcp/pcr" />
</div>
<p className="text-muted-foreground">
{t('menu.procurement.pcr_desc')}
</p>
</div>
</div>
</div>
{/* ═══════════════════════════════════════════════════════════════ */}
{/* 메인 테이블 */}
{/* ═══════════════════════════════════════════════════════════════ */}
<Suspense
fallback={
<DataTableSkeleton
columnCount={12}
searchableColumnCount={2}
filterableColumnCount={3}
cellWidths={["8rem", "8rem", "12rem", "12rem", "10rem", "12rem"]}
shrinkZero
/>
}
>
<PcrTableWrapper />
</Suspense>
</Shell>
);
}
|